<!--
 * @Author: jay
 * @Date: 2021-08-19 16:34:47
 * @LastEditTime: 2021-08-19 17:32:51
 * @LastEditors: Please set LastEditors
 * @Description: 浮动布局
 * @FilePath: \Briup\Common\study\2-css\3-其他样式规则\9-float.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动布局</title>
    <style>
        html{
            font: 12px '微软雅黑';
        }
        body{
            margin: 0;
        }
        ul{
            margin: 0;padding: 0;list-style: none;
        }
        .wrapper{
            width: 1080px;
            margin: 0 auto;
            
        }
        .xpsf{
            background-color: mediumpurple;
        }
        .xpsf ul.p_list{

        }
        .xpsf ul.p_list::after{
            content: "";
            display: block;
            clear: both;
        }
        .xpsf ul.p_list > li{
            height: 100px;
            
            /* float: left; */
        }
        
        .xpsf ul.p_list > li:nth-child(1){
            width: 200px;
            background-color: mediumvioletred;
            float: left;
            opacity: .4;
        }
        .xpsf ul.p_list > li:nth-child(2){
            width: 300px;
            background-color: mistyrose;
            float: left;
            opacity: .3;
        }
        .xpsf ul.p_list > li:nth-child(3){
            width: 400px;
            background-color: olivedrab;
            float: left;
        }
        .xpsf ul.p_list > li:nth-child(4){
            width: 500px;
            background-color: red;
            float: right;
        }
        
        
        .rqtj{
            background-color: lightsalmon;
            height: 300px;
        }
        .jjsh{
            background-color: lightseagreen;
            height: 300px;
        }
    </style>
</head>
<body>
    <!-- 容器 -->
    <div class="container">
        <!-- 新品首发 -->
        <div class="xpsf">
            <!-- 居中 -->
            <div class="wrapper">
                <ul class="p_list">
                    <li></li>
                    <li></li>
                    <li></li>
                    <li></li>
                    
                </ul>
            </div>
        </div>
        <!-- 人气推荐 -->
        <div class="rqtj">
            <div class="wrapper">
                人气推荐
            </div>
        </div>
        <!-- 居家生活 -->
        <div class="jjsh">
            <div class="wrapper">
                居家生活
            </div>
        </div>
    </div>
</body>
</html>